package com.zzyl.member.controller;

import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.member.domain.dto.UserLoginRequestDto;
import com.zzyl.member.domain.vo.UserLoginVo;
import com.zzyl.member.service.IFamilyMemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/member/user")
@Api(tags = "家属登录")
public class UserLogin {
    @Autowired
    private IFamilyMemberService familyMemberService;
    @PostMapping("/login")
    @ApiOperation("老人家属登录")
//    @Log(title = "老人家属登录",businessType = BusinessType.OTHER)
    public AjaxResult login(@RequestBody UserLoginRequestDto dto){
        UserLoginVo vo = familyMemberService.login(dto);
        return AjaxResult.success(vo);
    }
}
